This archive contains the source for a standalone code resource that conforms to a Window DEFinition (WDEF), as defined by Apple Computer in Inside Macintosh.
It provides a 'windoid' appearance. A windoid is a floating window that appears above document windows in an application and is commonly used for things like tool palettes, information windows, and the like.
The versions of the Windoid WDEF included in the ResEdit files can be used as-is. This WDEF is created for System 6 and later, but it would be easy to modify it for earlier systems if this is important.
There are compiler flags available in the code to support the ways in which the THINK languages and MacApp handle their own windoid WDEFs. (These are also included in the Other Styles folder in this archive, so you can just copy them to use in place of the original. Note that the MacApp Style Windoid does not support ALL of the possible variations, but it supports the most common ones (is supports everything except the "large" titlebar with title, and the grow box options).
I would like to see this WDEF be used as widely as possible, as I have seen many programs recently that use the old-style black-and-white version. The WDEF should be fairly compatible with the ones included with THINK Pascal and MacApp among others, so it should require a minimum of work to use. Also, I plan to support and upgrade this WDEF as needed, while maintaining its freeware status and including the source code (so it can be modified). I only request any modification of this WDEF be true to its form in terms of graphical design, and that you inform me of any changes (possibly providing source code if you think it might be useful to other Infinity Windoid users).
FEATURES:
• Supports System 7-style coloring of windows.
• In System 7, the tinge color set by the user in the Color control panel is used.
• Close box can be enabled from NewWindow by setting goAwayFlag.
• Zoom box implemented, utilized by adding zoomDocProc to the proc ID used to create the windoid.
• Title bar can appear along the left of the window if 2 is added to the proc ID (with or without a zoom box).
• For MacApp users, the behavior of the windoid can be switched.
• System 6 coloring scheme is also supported (can be set in Kolor or a similar control panel).
• DeviceLoop is used so the windoid will be drawn correctly even when it crosses monitors of differing depths (there's also a mechanism used that accomplishes the same thing with System 6).
• In System 7, indexed monitors' color tables are checked to see if there are enough different colors to display the color version (like the system WDEF).
• Optionally supports title string in the titlebar.
• Optionally supports a grow box.
• Provides a choice between two styles of the titlebar.
CHANGES IN VERSION 2.3
• Bug fixes for a couple things.
• More robust handling of drawing environment.
• Option for full THINK Windoid WDEF compatibility.
• Improved methods for handling the zoom box.
• More conformant to _Inside Macintosh: Toolbox Essentials_
CHANGES IN VERSION 2.5
• Includes optional support for grow box.
• Includes optional support for showing the title of the windoid in the titlebar.
• Adds a second style that has tinges along the sides of the titlebar.
• Better organization of code.
• Corrects a bug which caused 2.3 (but not 2.2) to crash on computers with a 68000 processor.
• Corrects a problem that could be caused if a windoid used a custom Window Color Table.
CHANGES IN VERSION 2.5.1
• Corrects a bug where a grow box was not being drawn in a color window
• Corrects a problem that might appear when compiled with THINK C
CHANGES IN VERSION 2.6
• Added a one-pixel slop to the hit testing on the titlebar gadgets to make them easier to hit.
• The appearance of the titlebar when dimmed with a custom window color table now matches that of the System WDEF. A handful of other changes were also made to the code to make the appearance with custom wctb's the same as that of the System WDEF.
• Made the titlebar revert to black-and-white on those PowerBooks in which this is necessary to make the appearance match that of the Apple WDEF.
• Added an option to have the zoom box be positioned so that it always hits the pattern the same way as the close box.
• Added an option to make a small version of the grow box.
• Fixed a problem with compiling under Metrowerks Code Warrior which caused mixed colors to be calculated incorrectly.
• Started including a Code Warrior project file for compiling the WDEF.
• Now uses UniversalProcPtrs to support PowerPC.
• MPW Makefile now has support for making a fat binary version of the Infinity Windoid WDEF (provided you have the Apple tools for doing so). Support for this was derived from the article about Standalone Code on PowerPC in Develop issue 17 (with the help of Aaron Giles).
For a full history of changes made in different versions, see the enclosed file "Version History" in the Documentation folder.
WDEF TESTER
Starting with version 2.6, a WDEF Tester application is also included. This application is not yet in final form. Notably, it does not work with System 6 or 68000 Macs yet. Note, however, that the Infinity Windoid WILL work on such systems. The tester does not yet have a documentation file, but its features should be pretty self-explanatory. In order to try out the Infinity Windoid file included with this archive, simply drop it onto the WDEF Tester application. You will then be prompted for paramaters (the WDEF in the file you dropped will be the default). Note also that the default build of the WDEF doesn't include support for a grow box or a title in the titlebar. There are other versions with other features in the Other Versions folder.
LEGAL STUFF:
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies (of the source). This software is provided "as is" without express or implied warranty.
HOW TO CONTACT THE AUTHOR:
To 'register' your copy of this WDEF if you plan to use it and want updates in the future, send me your e-mail address(es). Also, use these addresses to contact me with any problems or suggestions.